package mysql

import "gorm.io/gorm"

type Product struct {
	gorm.Model
	Name         string  `gorm:"type:varchar(30);not null;comment:'商品名称'"`
	Price        float64 `gorm:"type:decimal(10,2);not null;comment:'商品价格'"`
	Stock        int     `gorm:"type:int;not null;comment:'商品库存'"`
	CategoryName string  `gorm:"type:varchar(20);not null;default:0;comment:'商品分类名'"`
}

type Category struct {
	gorm.Model
	CateName string `gorm:"type:varchar(20);not null;comment:'商品分类名'"`
}
